



const em_temp_instance_t* TEMPERATURE_SENSOR_LIST[] = 
{
#if TEMP_SENSOR_NST1117_ENABLE    
    &nst1117,
#endif

#if TEMP_SENSOR_CST1117_ENABLE
    &cst1117,
#endif 
};

int em_temperature_list_get_count(void)
{
    return sizeof(TEMPERATURE_SENSOR_LIST)/sizeof(TEMPERATURE_SENSOR_LIST[0]);
}

const em_temp_instance_t* em_temperature_list_mounting( em_temp_desc_t* p_desc)
{
    em_temp_desc_t desc;

    for(int i = 0; i < em_temperature_list_get_count(); i ++)
    {
        if( TEMPERATURE_SENSOR_LIST[i]->mounting( &desc ) )
        {
            *p_desc = desc;
            return TEMPERATURE_SENSOR_LIST[i];
        }
    }

    return NULL;
}

